package com.zuul.cloudzull.web;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;

@RestController
public class HelloAction {
    @RequestMapping("/hello.do")
    public String hello(HttpServletRequest request){
        Enumeration<String> headerNames= request.getHeaderNames();
        while ( headerNames.hasMoreElements() ){
            String header=headerNames.nextElement();
            System.out.println(header+":"+request.getHeader(header));
        }
        return "hello world";
    }
}
